package cn.niit.letuseatdemo.mapper;
import cn.niit.letuseatdemo.entity.domain.User;
import cn.niit.letuseatdemo.entity.domain.UserAddress;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @Description: 用户mapper
* @Author: Zhang Shiqi
* @CreateTime： 2022/10/26 19:43
 * @param: null
 * @return: null
**/

@Repository
public interface UserMapper {

    /*
    * @Description: 用户注册使用，添加用户到数据库
    * @Author: Zhang Shiqi
    * @CreateTime： 2022/10/30 23:42
     * @param: User
     * @return: int
    **/
    public  int insertUser(User User);

    /*
    * @Description: 用户登录
    * @Author: Zhang Shiqi
    * @CreateTime： 2022/10/31 0:47
     * @param: userTel
     * @param: userPassword
     * @return: cn.niit.letuseatdemo.entity.domain.User
    **/
    User selectUserByUserTelPassword(@Param("userTel") String userTel, @Param("userPassword") String userPassword);

    /**
     * @Description: 用户信息更新${TODO}
     * @Author: Jin_Na
     * @CreateTime: 2022/11/2 23:44
     * @param: null
     * @return: null
     **/
    public User selectUserByUserId(Long userId);

    public int updateUser(User user);

    /*
     * @Description:  根据账号、密码查询用户
     * @Author: Zhang Shiqi
     * @CreateTime： 2022/11/11 16:33
     * @param: userPhone
     * @param: userPassword
     * @return: cn.niit.hospital.entity.domain.User
     **/
    User selectUserByUserPhonePassword(@Param("userTel") String userTel, @Param("password") String userPassword);
    
    /*
    * @Description: 查询用户列表
    * @Author: Jin_Na
    * @CreateTime: 2022/12/8 17:12
     * @param: user
     * @return: java.util.List<cn.niit.letuseatdemo.entity.domain.User>
    **/
    public List<User> selectUserList(User user);



}
